3.1290 \(\int \frac{(A+B x) (a+c x^2)}{d+e x} \, dx\)

Optimal. Leaf size=86 \[ \frac{x \left (a B e^2-A c d e+B c d^2\right )}{e^3}-\frac{\left (a e^2+c d^2\right ) (B d-A e) \log (d+e x)}{e^4}-\frac{c x^2 (B d-A e)}{2 e^2}+\frac{B c x^3}{3 e} \]

[Out]

((B*c*d^2 - A*c*d*e + a*B*e^2)*x)/e^3 - (c*(B*d - A*e)*x^2)/(2*e^2) + (B*c*x^3)/(3*e) - ((B*d - A*e)*(c*d^2 +
a*e^2)*Log[d + e*x])/e^4

________________________________________________________________________________________

Rubi [A]  time = 0.0758643, antiderivative size = 86, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.05, Rules used = {772} \[ \frac{x \left (a B e^2-A c d e+B c d^2\right )}{e^3}-\frac{\left (a e^2+c d^2\right ) (B d-A e) \log (d+e x)}{e^4}-\frac{c x^2 (B d-A e)}{2 e^2}+\frac{B c x^3}{3 e} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(a + c*x^2))/(d + e*x),x]

[Out]

((B*c*d^2 - A*c*d*e + a*B*e^2)*x)/e^3 - (c*(B*d - A*e)*x^2)/(2*e^2) + (B*c*x^3)/(3*e) - ((B*d - A*e)*(c*d^2 +
a*e^2)*Log[d + e*x])/e^4

Rule 772

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegr
and[(d + e*x)^m*(f + g*x)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{(A+B x) \left (a+c x^2\right )}{d+e x} \, dx &=\int \left (\frac{B c d^2-A c d e+a B e^2}{e^3}+\frac{c (-B d+A e) x}{e^2}+\frac{B c x^2}{e}+\frac{(-B d+A e) \left (c d^2+a e^2\right )}{e^3 (d+e x)}\right ) \, dx\\ &=\frac{\left (B c d^2-A c d e+a B e^2\right ) x}{e^3}-\frac{c (B d-A e) x^2}{2 e^2}+\frac{B c x^3}{3 e}-\frac{(B d-A e) \left (c d^2+a e^2\right ) \log (d+e x)}{e^4}\\ \end{align*}

Mathematica [A]  time = 0.043717, size = 80, normalized size = 0.93 \[ \frac{e x \left (6 a B e^2+3 A c e (e x-2 d)+B c \left (6 d^2-3 d e x+2 e^2 x^2\right )\right )-6 \left (a e^2+c d^2\right ) (B d-A e) \log (d+e x)}{6 e^4} \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(a + c*x^2))/(d + e*x),x]

[Out]

(e*x*(6*a*B*e^2 + 3*A*c*e*(-2*d + e*x) + B*c*(6*d^2 - 3*d*e*x + 2*e^2*x^2)) - 6*(B*d - A*e)*(c*d^2 + a*e^2)*Lo
g[d + e*x])/(6*e^4)

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 116, normalized size = 1.4 \begin{align*}{\frac{Bc{x}^{3}}{3\,e}}+{\frac{Ac{x}^{2}}{2\,e}}-{\frac{Bc{x}^{2}d}{2\,{e}^{2}}}-{\frac{Acdx}{{e}^{2}}}+{\frac{aBx}{e}}+{\frac{Bc{d}^{2}x}{{e}^{3}}}+{\frac{\ln \left ( ex+d \right ) aA}{e}}+{\frac{{d}^{2}\ln \left ( ex+d \right ) Ac}{{e}^{3}}}-{\frac{\ln \left ( ex+d \right ) aBd}{{e}^{2}}}-{\frac{{d}^{3}\ln \left ( ex+d \right ) Bc}{{e}^{4}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(c*x^2+a)/(e*x+d),x)

[Out]

1/3*B*c*x^3/e+1/2/e*A*x^2*c-1/2/e^2*B*x^2*c*d-1/e^2*A*c*d*x+1/e*a*B*x+1/e^3*B*c*d^2*x+1/e*ln(e*x+d)*a*A+d^2/e^
3*ln(e*x+d)*A*c-1/e^2*ln(e*x+d)*a*B*d-d^3/e^4*ln(e*x+d)*B*c

________________________________________________________________________________________

Maxima [A]  time = 1.08098, size = 131, normalized size = 1.52 \begin{align*} \frac{2 \, B c e^{2} x^{3} - 3 \,{\left (B c d e - A c e^{2}\right )} x^{2} + 6 \,{\left (B c d^{2} - A c d e + B a e^{2}\right )} x}{6 \, e^{3}} - \frac{{\left (B c d^{3} - A c d^{2} e + B a d e^{2} - A a e^{3}\right )} \log \left (e x + d\right )}{e^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+a)/(e*x+d),x, algorithm="maxima")

[Out]

1/6*(2*B*c*e^2*x^3 - 3*(B*c*d*e - A*c*e^2)*x^2 + 6*(B*c*d^2 - A*c*d*e + B*a*e^2)*x)/e^3 - (B*c*d^3 - A*c*d^2*e
 + B*a*d*e^2 - A*a*e^3)*log(e*x + d)/e^4

________________________________________________________________________________________

Fricas [A]  time = 1.88688, size = 211, normalized size = 2.45 \begin{align*} \frac{2 \, B c e^{3} x^{3} - 3 \,{\left (B c d e^{2} - A c e^{3}\right )} x^{2} + 6 \,{\left (B c d^{2} e - A c d e^{2} + B a e^{3}\right )} x - 6 \,{\left (B c d^{3} - A c d^{2} e + B a d e^{2} - A a e^{3}\right )} \log \left (e x + d\right )}{6 \, e^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+a)/(e*x+d),x, algorithm="fricas")

[Out]

1/6*(2*B*c*e^3*x^3 - 3*(B*c*d*e^2 - A*c*e^3)*x^2 + 6*(B*c*d^2*e - A*c*d*e^2 + B*a*e^3)*x - 6*(B*c*d^3 - A*c*d^
2*e + B*a*d*e^2 - A*a*e^3)*log(e*x + d))/e^4

________________________________________________________________________________________

Sympy [A]  time = 0.953493, size = 80, normalized size = 0.93 \begin{align*} \frac{B c x^{3}}{3 e} - \frac{x^{2} \left (- A c e + B c d\right )}{2 e^{2}} + \frac{x \left (- A c d e + B a e^{2} + B c d^{2}\right )}{e^{3}} - \frac{\left (- A e + B d\right ) \left (a e^{2} + c d^{2}\right ) \log{\left (d + e x \right )}}{e^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x**2+a)/(e*x+d),x)

[Out]

B*c*x**3/(3*e) - x**2*(-A*c*e + B*c*d)/(2*e**2) + x*(-A*c*d*e + B*a*e**2 + B*c*d**2)/e**3 - (-A*e + B*d)*(a*e*
*2 + c*d**2)*log(d + e*x)/e**4

________________________________________________________________________________________

Giac [A]  time = 1.21863, size = 131, normalized size = 1.52 \begin{align*} -{\left (B c d^{3} - A c d^{2} e + B a d e^{2} - A a e^{3}\right )} e^{\left (-4\right )} \log \left ({\left | x e + d \right |}\right ) + \frac{1}{6} \,{\left (2 \, B c x^{3} e^{2} - 3 \, B c d x^{2} e + 6 \, B c d^{2} x + 3 \, A c x^{2} e^{2} - 6 \, A c d x e + 6 \, B a x e^{2}\right )} e^{\left (-3\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+a)/(e*x+d),x, algorithm="giac")

[Out]

-(B*c*d^3 - A*c*d^2*e + B*a*d*e^2 - A*a*e^3)*e^(-4)*log(abs(x*e + d)) + 1/6*(2*B*c*x^3*e^2 - 3*B*c*d*x^2*e + 6
*B*c*d^2*x + 3*A*c*x^2*e^2 - 6*A*c*d*x*e + 6*B*a*x*e^2)*e^(-3)